<script setup lang="ts">
import { useUserStore } from '@/stores/modules/user'
import LocaleDropdown from './LocaleDropdown.vue'
const userStore = useUserStore()
const loginout = () => {
  userStore.logout()
}
</script>

<template>
  <main>
    <nav>
      <el-space>
        <router-link to="/">{{ $t('nav.home') }}</router-link>
        <router-link to="/about">{{ $t('nav.about') }}</router-link>
        <LocaleDropdown />
        <el-button @click="loginout">{{ $t('login.logout') }}</el-button>
      </el-space>
    </nav>
  </main>
</template>
